package com.tlxch.controller.teacher;

import com.tlxch.pojo.SHabit;
import com.tlxch.result.Result;
import com.tlxch.server.teacher.TSHabitService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "学习习惯相关接口")
@Slf4j
@RestController
@RequestMapping("/teacher/tshabit")
public class TSHabitController {
    @Autowired
    TSHabitService tsHabitService;

    @PostMapping("/add")
    @ApiOperation("新增学生学习习惯")
    public Result addSHabit(@RequestBody SHabit sHabit){
        tsHabitService.add(sHabit);
        return Result.success();
    }
}
